package edu.gatech.gro.model;

import java.util.List;

public class ObjectResponse {

	private boolean success;
	private Object data;
	private int totalCount;
	private List<String> errors;

	public boolean isSuccessful() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getErrorsAsString() {
		StringBuilder b = new StringBuilder();
		for (int i = 0; i < errors.size(); i++) {
			if (i > 0) {
				b.append("\n");
			}
			b.append(errors.get(i));
		}
		return b.toString();
	}

	public List<String> getErrors() {
		return errors;
	}

	public void setErrors(List<String> errors) {
		this.errors = errors;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}
}
